{template 'include/header'}

<div class="container container-fill">
	<style>
		.show-more {padding-bottom:30px;}
	</style>
	<div class="head" style="height:50px !important; line-height:50px !important;">
		<a style="float:left;color:#706d5e;line-height:40px;" href="{php echo $this->createMobileUrl('Welfare');}"><span class="fa fa-home" style="font-size:24px;line-height:50px;" aria-hidden="true"></span> 首页</a>
		<a href="javascript:;" style="height:40px; line-height:40px;font-size:14px;margin-left:-80px" id="fli_btn" class="bn text-center">
	   		<span style="color:#706d5e !important; display:inline-block;">
				{$class_name}
			</span>
    	</a>
    	<div class="f_r">
    		<a href="{php echo $this->createMobileUrl('home');}" style="color:#fff; ">
    			<img src="<?php echo MODULE_URL;?>template/mobile/img/touxiang.png" height="24px" style="margin-top:-5px"> 
    			<span style=" font-size:14px; vertical-align:top; color:#706d5e; line-height:50px">个人主页</span>
			</a>
    	</div>
   		<div class="float_r" style="display:none;width:40% !important; margin-top:6px; margin-right:11px;">
		    <form action="index.php" method="get">
				<input type="hidden" name="i" value="3" />
				<input type="hidden" name="c" value="entry" />
				<input type="hidden" name="m" value="hx_zhongchou" />
				<input type="hidden" name="do" value="list2" />
				<input type="hidden" name="sort" value="0" />
				<div class="input-group"  style="width:100% !important; float:left;">
					<input type="text" class="form-control" style="width:90% !important;border-top-right-radius: 4px;border-bottom-right-radius: 4px; float:right; margin-top:2px;" name="keyword" value="" placeholder="关键字">
					<span class="input-group-btn" style="  position:absolute; top:-5px; right:24px; z-index:9999">
						<button class="btn btn-info" style="background:none !important; border:none !important; padding:0px 0 !important;" type="submit">
			            	<span class="glyphicon glyphicon-search" aria-hidden="true" style="color:#cecfca !important; font-size:14px;"></span>
			            </button>
					</span>
		            <div class="clear"></div>
				</div>
	        	<div class="clear"></div>
			</form>
    	</div>

    	<div class="clear"></div>

	</div>
	<style type='text/css'>
		.sel { background:#33cdd6; color:#fff;}
		.nosel { background:#fff;color:#000}
	</style>
	<div class="shopping-main" style="margin-top:50px;padding:0;">
		<div class="list" id="list">
			<div style='float:left;height:56px; line-height:30px !important;width:100%; box-sizing:border-box; padding:10px 15px 30px 15px;margin:0px 0% 0px 0%; background:#fff;'>
	   			<div class='sel' style='border-top-left-radius: 5px;border-bottom-left-radius:5px;border:1px solid #33cdd6;text-align: center;float:left;width:50%' onclick="location.href='{php echo $this->createMobileUrl('cat',array('class_id'=>$class_id, 'class_name'=>$class_name));}'">
					正在捐款 <i class="fa fa-arrow-down"></i>		
				</div>
				<div class="nosel" style='border:1px solid #33cdd6;border-top-right-radius: 5px;border-bottom-right-radius:5px; margin-left:-1px;float:left;width:50%;text-align: center;' onclick="location.href='{php echo $this->createMobileUrl('catdone',array('class_id'=>$class_id, 'class_name'=>$class_name));}'">
					捐款完成 		
				</div>
			</div>
			<div style="clear:both"></div>
		{loop $class_pro $cpro}
			
			<!--list-item-->
			<div class="i_d_5" style="">
		  		<div class="i_d_5_1" style="padding: 10px 15px 10px 10px;">
		  			<a href="{php echo $this->createMobileUrl('per',array('pro_id'=>$cpro['pro_id']));}">
		    			<div class="i_d_5_1_l">
		    				<img src="{$_W['attachurl']}{$cpro['pro_feature']}">
		    			</div>
		    			<div class="i_d_5_1_r" style="padding-right:0 !important;">
			    			<div>
			   					<div><span class="title">{$cpro['pro_name']}</span></div>
			    				<div class="i_show_li">
			    					<p>{$cpro['pro_short']}</p>
			    				</div>
			    			</div>
			    			<div style="padding:0 !important; margin:-10px 0 !important;">
			    				<div class="progress float_l" style="height:4px; width:74%; margin-top:8px; margin-bottom:15px;">
			      					<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="{php echo round($cpro['pro_fund']/$cpro['pro_goal'],4)*100}" aria-valuemin="0" aria-valuemax="100" style="width: {php echo round($cpro['pro_fund']/$cpro['pro_goal'],4)*100}%;"></div>
			    				</div>
				    			<div class="float_r" style="vertical-align:bottom; width:25%; overflow:hidden; padding-top:0px; text-align:right; padding-right:0px; color:#fe6903;">
				    				<span id="bfb_show">{php echo round($cpro['pro_fund']/$cpro['pro_goal'],4)*100}</span>%
				    			</div>
			    				<div class="clear"></div>
			    			</div>
		    				<div class="clear"></div>
			    			<div style="margin-top:5px;">
			    				<div class="float_l i_show_li">
			    					共<span style="color:#e39a65;">￥{$cpro['pro_fund']}</span>元爱心
			    				</div>
			    				<div class="float_r i_show_li">
			    					目标<span style="color:#e39a65;">{$cpro['pro_goal']}</span>元
			    				</div>
			    			</div>
		    			</div>
		    			<div class="clear"></div>
		   			</a> 
		  		</div>
			</div>
			
		{/loop}
		</div>
	<div class="show-more" style="margin:0 !important; padding:10px  !important; background:#fff;">
		<a href="javascript:;" onclick="loadPage('1', 'list')" class="btn btn-default btn-block" id="pager" >浏览更多</a>
	</div>
</div>
<script type="text/javascript">
	function loadPage(pindex, container) {
		pindex = parseInt(pindex) + 1;
		$('#pager').html('正在加载数据...');
		$.get(location.href, {'page' : pindex}, function(html) {
		
			if (html.indexOf('list-item') > -1) {
				html=html.substr(html.indexOf('list-item')+12,html.indexOf('class="show-more"')-html.indexOf('list-item')-18);
				$('#'+container).append(html);
				$('#pager').get(0).onclick = function(){
					loadPage(pindex, container);
				}
				$('#pager').html("浏览更多");
			} else {
				$('#pager').html('已经显示全部');
			}
		});
	}
</script>

<!--底部logo和版权-->
{template 'include/footer'}
        								
</div>
    
</body>
</html>
